package org.dant.ant.extension.net.socket;

import org.dant.ant.extension.net.RemoteHelper;
import org.dant.ant.extension.tasks.internal.RemoteCommand;
import org.dant.ant.extension.tasks.internal.RemoteResponse;
import org.dant.ant.extension.tasks.internal.Endpoint;
import org.dant.ant.extension.net.NetConstants;

public class SocketHelper implements RemoteHelper {

  public RemoteResponse invoke(Endpoint destHost, RemoteCommand rCmd) throws Exception {
    SocketClient client = new SocketClient(destHost);
    return client.remoteCall(rCmd);
  }
  
  public String getProtocol() {
    return NetConstants.SOCKET_PROTOCOL;
  }
  
  public String getPath() {
    return NetConstants.DEFAULT_PATH;
  }
}
